@extends('admin.layouts.index')
@section('title', "修改用户权限")
@section('content')

<div class="row">
    <div class="col-md-12">
        <form id="comment-form" method="POST" action="{{ URL::current() }}">
            <div class="card">
                <div class="card-header">
                    <div class="card-title">修改用户权限</div>
                </div>
                <div class="card-body">
                    <div class="form-group">
                        <label for="text">用户账号</label>
                        <input type="text" class="form-control" name="" placeholder="请输入新密码" value="{{ empty($users->username) ? $users->nike : $users->username }}" disabled="">
                        @csrf
                    </div>
                    <div class="form-group">
                        <label for="text">公用小程序使用权限:</label>
                        <select class="form-control input-square" name="miniapp_style">
                            <option value="2" @if($usersauthority->miniapp_style == 2) selected @endif>无权限</option>
                            <option value="1" @if($usersauthority->miniapp_style == 1) selected @endif>有权限</option>
                            <option value="3" @if($usersauthority->miniapp_style == 3) selected @endif>客服权限</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="text">三方小程序权限:</label>
                        <select class="form-control input-square" name="miniapp_third">
                            <option value="1" @if($usersauthority->miniapp_third == 1) selected @endif>无权限</option>
                            <option value="2" @if($usersauthority->miniapp_third == 2) selected @endif>有权限</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="text">后台上架小程序:</label>
                        <select class="form-control input-square" name="miniapp_publish">
                            <option value="2" @if($usersauthority->miniapp_publish == 2) selected @endif>无权限</option>
                            <option value="1" @if($usersauthority->miniapp_publish == 1) selected @endif>有权限</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="text">API获取Token权限:</label>
                        <select class="form-control input-square" name="api_token">
                            <option value="1" @if($usersauthority->api_token == 1) selected @endif>无权限</option>
                            <option value="2" @if($usersauthority->api_token == 2) selected @endif>有权限</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="text">API获取小程序Urlscheme:</label>
                        <select class="form-control input-square" name="api_urlscheme">
                            <option value="1" @if($usersauthority->api_urlscheme == 1) selected @endif>无权限</option>
                            <option value="2" @if($usersauthority->api_urlscheme == 2) selected @endif>有权限</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="text">私有化API:</label>
                        <select class="form-control input-square" name="third_api">
                            <option value="1" @if($usersauthority->third_api == 1) selected @endif>无权限</option>
                            <option value="2" @if($usersauthority->third_api == 2) selected @endif>有权限</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="text">自定义JS:</label>
                        <select class="form-control input-square" name="lists_htmls">
                            <option value="1" @if($usersauthority->lists_htmls == 1) selected @endif>无权限</option>
                            <option value="2" @if($usersauthority->lists_htmls == 2) selected @endif>有权限</option>
                        </select>
                    </div>
                </div>
                <div class="card-action">
                    <button class="btn btn-primary">立即更新权限</button>
                </div>
            </div>
        </form>
    </div>
</div>


@endsection
